package com.example.demo.redis.service.impl;

import com.example.demo.model.Material;
import com.example.demo.redis.repository.RedisZhuJieRepository;
import com.example.demo.redis.service.RedisZhuJieService;
import com.example.demo.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/12/28.
 */
@Service
public class RedisZhuJieServiceImpl implements RedisZhuJieService{

    @Autowired
    private RedisZhuJieRepository redisZhuJieRepository;

    @Override
    public Result<List<Material>> queryZhuJieMaterial() {
        return redisZhuJieRepository.queryZhuJieMaterial();
    }

    @Override
    public Result<List<Material>> updateZhuJieMaterial(Material material) {

        return redisZhuJieRepository.updateZhuJieMaterial(material);
    }

    @Override
    public void deleteZhuJieMaterial(Integer id) {
        redisZhuJieRepository.deleteZhuJieMaterial(id);
    }

    @Override
    public Material insertZhuJieMaterial(Material material) {
        return redisZhuJieRepository.insertZhuJieMaterial(material);
    }


}
